package com.example.infrastructure.persistence.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.infrastructure.common.BasePO;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 配送信息表 PO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("deliveries")
@Schema(name = "Deliveries", description = "配送信息表")
public class Deliveries extends BasePO {

    private static final long serialVersionUID = 1L;

    @Schema(description = "配送单号")
    @TableField("delivery_no")
    private String deliveryNo;

    @Schema(description = "处方ID")
    @TableField("prescription_id")
    private Long prescriptionId;

    @Schema(description = "配送方式：1快递配送，2到店自取")
    @TableField("delivery_type")
    private Byte deliveryType;

    @Schema(description = "收件人姓名")
    @TableField("receiver_name")
    private String receiverName;

    @Schema(description = "收件人电话")
    @TableField("receiver_phone")
    private String receiverPhone;

    @Schema(description = "省份")
    @TableField("province")
    private String province;

    @Schema(description = "城市")
    @TableField("city")
    private String city;

    @Schema(description = "区县")
    @TableField("district")
    private String district;

    @Schema(description = "详细地址")
    @TableField("address")
    private String address;

    @Schema(description = "邮政编码")
    @TableField("postal_code")
    private String postalCode;

    @Schema(description = "快递公司")
    @TableField("courier_company")
    private String courierCompany;

    @Schema(description = "物流单号")
    @TableField("tracking_number")
    private String trackingNumber;

    @Schema(description = "配送费用")
    @TableField("delivery_fee")
    private BigDecimal deliveryFee;

    @Schema(description = "预计送达时间")
    @TableField("estimated_time")
    private LocalDateTime estimatedTime;

    @Schema(description = "实际送达时间")
    @TableField("actual_time")
    private LocalDateTime actualTime;

    @Schema(description = "状态：0待发货，1已发货，2配送中，3已送达，4配送失败")
    @TableField("status")
    private Byte status;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "租户编号")
    @TableField("tenant_id")
    private Long tenantId;


}